package com.ruoyi.campus.service.impl;

import com.ruoyi.campus.domain.Campusdistribution;
import com.ruoyi.campus.domain.vo.CampusdistributionVO;
import com.ruoyi.campus.mapper.CampusdistributionMapper;
import com.ruoyi.campus.service.ICampusdistributionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 校区分销配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-10
 */
@Service
public class CampusdistributionServiceImpl implements ICampusdistributionService 
{
    @Autowired
    private CampusdistributionMapper campusdistributionMapper;

    /**
     * 查询校区分销配置
     * 
     * @param distributionId 校区分销配置主键
     * @return 校区分销配置
     */
    @Override
    public Campusdistribution selectCampusdistributionByDistributionId(Integer distributionId)
    {
        return campusdistributionMapper.selectCampusdistributionByDistributionId(distributionId);
    }

    /**
     * 查询校区分销配置列表
     * 
     * @param campusdistributionvo 校区分销配置
     * @return 校区分销配置
     */
    @Override
    public List<CampusdistributionVO> selectCampusdistributionList(CampusdistributionVO campusdistributionvo)
    {
        return campusdistributionMapper.selectCampusdistributionList(campusdistributionvo);
    }


    // /**
    //  * 查询校区分销配置列表
    //  *
    //  * @param campusdistribution 校区分销配置
    //  * @return 校区分销配置
    //  */
    // @Override
    // public List<Campusdistribution> selectCampusdistributionList(Campusdistribution campusdistribution)
    // {
    //     return campusdistributionMapper.selectCampusdistributionList(campusdistribution);
    // }



    /**
     * 新增校区分销配置
     * 
     * @param campusdistribution 校区分销配置
     * @return 结果
     */
    @Override
    public int insertCampusdistribution(Campusdistribution campusdistribution)
    {
        return campusdistributionMapper.insertCampusdistribution(campusdistribution);
    }

    /**
     * 修改校区分销配置
     * 
     * @param campusdistribution 校区分销配置
     * @return 结果
     */
    @Override
    public int updateCampusdistribution(Campusdistribution campusdistribution)
    {
        return campusdistributionMapper.updateCampusdistribution(campusdistribution);
    }

    /**
     * 批量删除校区分销配置
     * 
     * @param distributionIds 需要删除的校区分销配置主键
     * @return 结果
     */
    @Override
    public int deleteCampusdistributionByDistributionIds(Integer[] distributionIds)
    {
        return campusdistributionMapper.deleteCampusdistributionByDistributionIds(distributionIds);
    }

    /**
     * 删除校区分销配置信息
     * 
     * @param distributionId 校区分销配置主键
     * @return 结果
     */
    @Override
    public int deleteCampusdistributionByDistributionId(Integer distributionId)
    {
        return campusdistributionMapper.deleteCampusdistributionByDistributionId(distributionId);
    }
}
